home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / poppar.z / poppar
Encoding:
Text File  |  1998-10-30  |  3.1 KB  |  86 lines

  1. POPPAR(3I)                                             Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      __ppooppppaarr, PPOOPPPPAARR - Computes bit population parity
  6.  
  7. SSYYNNOOPPSSIISS
  8.      C/C++:
  9.  
  10.      ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
  11.      iinntt __ppooppppaarr ((lloonngg _i));;
  12.  
  13.      Fortran:
  14.  
  15.      PPOOPPPPAARR (([II==]_i))
  16.  
  17. IIMMPPLLEEMMEENNTTAATTIIOONN
  18.      C/C++:  UNICOS and UNICOS/mk systems
  19.  
  20.      Fortran:  UNICOS, UNICOS/mk, and IRIX systems
  21.  
  22. SSTTAANNDDAARRDDSS
  23.      C/C++:  Cray Research extension
  24.  
  25.      Fortran:  CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
  26.      90
  27.  
  28. CC//CC++++ DDEESSCCRRIIPPTTIIOONN
  29.      The __ppooppppaarr function returns 0 if the argument _i has an even number of
  30.      bits that are set to 1.  This is the parity of the population count
  31.      for argument _i.
  32.  
  33. FFOORRTTRRAANN DDEESSCCRRIIPPTTIIOONN
  34.      This intrinsic function computes the bit population parity and returns
  35.      an integer value.  It accepts the following argument:
  36.  
  37.      _i    A Boolean, integer, real, or Cray pointer value.  On IRIX
  38.           systems, _i cannot be declared as RREEAALL((KKIINNDD==1166)).
  39.  
  40.      PPOOPPPPAARR is an elemental function.  The name of this intrinsic cannot be
  41.      passed as an argument.
  42.  
  43. NNOOTTEESS
  44.      The bit representation of the logical data type is not consistent
  45.      among Cray Research systems.  For further details, see your compiler's
  46.      reference manuals.
  47.  
  48. CC//CC++++ NNOOTTEESS
  49.      Because __ppooppppaarr is an intrinsic function, no externally visible
  50.      library function is available for it.  The compiler generates inline
  51.      code to produce the result.
  52.  
  53. FFOORRTTRRAANN RREETTUURRNN VVAALLUUEESS
  54.      In Fortran, PPOOPPPPAARR returns the value 0 if an even number of bits in _i
  55.      are set.  It returns the value 1 if an odd number of bits are set in
  56.      _i.
  57.  
  58.      The return value is of type integer.
  59.  
  60. EEXXAAMMPPLLEESS
  61.      The following section of Fortran code shows the PPOOPPPPAARR function used
  62.      with an argument of type integer.  The bit pattern of the argument and
  63.      the value of the result are also given.  For simplicity, a 16-bit
  64.      object is used.
  65.  
  66.           INTEGER I1, I2
  67.           ...
  68.           I2 = POPPAR(I1)
  69.  
  70.  
  71.            ---------------------------------------------------------------
  72.           | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
  73.            ---------------------------------------------------------------
  74.                                         I1
  75.  
  76.      The PPOOPPPPAARR function returns the value 0 to the integer variable II22.
  77.  
  78. SSEEEE AALLSSOO
  79.      A complete list of C/C++ intrinsic functions available on Cray
  80.      Research systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR
  81.      -2179.
  82.  
  83.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  84.      printed version of this man page.
  85.  
  86.